<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>生命周期钩子</title>
    <script src="vue3.js"></script>
</head>
<body>
    <div id="app">
        <h1 ref="title">accp</h1>
    </div>
    <script>
        const {createApp} = Vue
        createApp({
            data(){
               return {
                   msg: 'hello world!!'
               }
            },
            created(){
                console.log('created....',this.$refs.title)
            },
            beforeCreate(){
                console.log('beforeCreate...')
            },
            beforeMount(){
                console.log('beforeMount...')
            },
            mounted(){
                console.log('mounted...',this.$refs.title)
            }
        }).mount("#app")
    </script>
</body>
</html>